/**
 * 
 */
package com.ubo.transform.java;

import java.util.Collection;

import com.ubo.graphviz.model.graph.EGraphType;
import com.ubo.graphviz.model.graph.Graph;
import com.ubo.graphviz.model.graph.statement.IStatement;

/**
 * @author saludegu
 * 
 */
public class GraphvizGraphBuilder {

	/**
	 * Graphique en cours de construction.
	 */
	protected Graph mGraph;

	/**
	 * 
	 * Constructor
	 * 
	 * @param name
	 * @param graphType
	 */
	public GraphvizGraphBuilder(String name, EGraphType graphType) {
		mGraph = new Graph(name, graphType);
	}

	/**
	 * Ajout d'un statement au graphe.
	 */
	public void addStatementToGraph(IStatement newStatement) {
		mGraph.addStatement(newStatement);
	}

	/**
	 * Ajout d'un statement au graphe.
	 */
	public void addAllStatementToGraph(Collection<IStatement> statements) {
		mGraph.addStatements(statements);
	}

	/**
	 * Getter du graph.
	 * 
	 * @return
	 */
	public Graph getGraph() {
		return mGraph;
	}
}
